const path = require('path')

module.exports = {
    mode: 'development',
    entry: {
        'zg_wechat_sdk': path.resolve(__dirname, './src/index')
    },
    output: {
        path: path.resolve(__dirname, './dist'),
        filename: '[name].js'
    },
    module: {
        rules: [
            {
                enforce: 'pre',
                test: /\.js$/,
                exclude: /node_modules/,
                loader: 'eslint-loader'
            },
            {
                test: /\.js$/,
                exclude: /node_modules/,
                loader: 'babel-loader'
            }
        ]
    },
    externals: {
        axios: 'axios'
    },
    devServer: {
        contentBase: path.resolve(__dirname, './dist'),
        inline: true
    }
}